/* 示例块样式 */
.example-block {
  margin-bottom: 60px;
  padding: 20px;
  border-radius: 8px;
  background-color: #fafafa;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.example-block h2 {
  color: #2196f3;
  margin-bottom: 20px;
  font-size: 1.5rem;
  border-bottom: 2px solid #2196f3;
  padding-bottom: 10px;
}

/* 主要内容区域样式 */
.content-container {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

/* 代码区域容器 */
.code-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.code-section h3 {
  color: #333;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

/* 代码编辑区域 */
.code-editor {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 15px;
  font-size: 14px;
  line-height: 1.5;
  background-color: white;
  resize: vertical;
  transition: border-color 0.3s ease;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
}

/* HTML代码编辑器样式 */
.html-editor {
  background-color: white;
  border-color: #ddd;
}

.code-editor:focus {
  outline: none;
  border-color: #2196f3;
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

/* 预览区域 */
.preview-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.preview-section h3 {
  color: #333;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

/* 网格预览容器 */
.grid-preview {
  width: 100%;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 20px;
  overflow: auto;
  transition: border-color 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .content-container {
    flex-direction: column;
  }

  .code-section,
  .preview-section {
    min-width: auto;
  }

  .example-block {
    margin-bottom: 40px;
    padding: 15px;
  }

  .grid_main h1 {
    font-size: 2rem;
  }

  .example-block h2 {
    font-size: 1.5rem;
  }
}